﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Devtm.Parsing
{

    public class ItemFormula : ItemBase
    {

        public override string Parse(Lexer l, Context c, string _result)
        {

            string result = _result;

        

                Token t = l.Next();

                switch (t)
                {
                    case Token.OpenBrace:
                        result = VisitOpenBrace(l, c, result);
                        break;

                    case Token.CloseBrace:
                        result = VisitCloseBrace(l, c, result);
                        break;

                    case Token.DoublePoint:
                        result = VisitDoublePoint(l, c, result);
                        break;

                    case Token.Text:
                        result = VisitText(l, c, result);
                        break;

                }


            return result;

        }

    }


}
